Updating sum of subform
Question
You can find this question from this link 👉Updating sum of subform
Answer
You can find the solution to the question from the video below
The Parameters for the Workflow are given below

The Code Snippet is as follows
input.Expense_Claim_History.clear();
if(input.Purpose == null)
{
return;
}
expenses = Expense_Claim[Expense_Purpose == input.Purpose];
input.Expense_Claim_History.insert(expenses);
total = 0;
for each expense in expenses
{
total = total + expense.Amount;
}
input.Total_Expense = total;




